﻿@model NC.Models.AccountUser
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    ViewBag.Title = "Register Account";
}
<script src="@Url.Content("~/Scripts/js/RegisterAccount.js")" type="text/javascript"></script>   
<div class="container">
    <div class=" container">
        @if(ViewBag.message!=null)
        {
            <div class="alert alert-success alert-dismissable">
                <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
                @ViewBag.message
            </div>
        }
        @if (ViewBag.SendActivation != null)
        {  
            <div class="alert alert-success alert-dismissable">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            @ViewBag.SendActivation
            </div>
        }
        <div class="login-form-section">
            <div class="login-content bounceIn" >
                @using (Html.BeginForm("RegisterAccount", "Account"))
                {
                    <div class="section-title">
                        <h3>Register With Us</h3>
                    </div>
                    <div class="textbox-wrap">
                                <div class="input-group">
                                    <span class="input-group-addon  glyphicon glyphicon-envelope "></span>
                                @Html.TextBoxFor(model => model.Email, new { @class = "form-control", @placeholder = "Email Address", @required = "required", @type = "email" })
                                    </div>
                            </div>
                    if (@ViewBag.Error != null)
                    {
                            <div class="alert alert-danger alert-dismissable">@ViewBag.Error</div>}
                            <div id="ValidPassContainer" class="textbox-wrap">
                                <div class="input-group">
                                    <span class="input-group-addon glyphicon glyphicon-lock "></span>
                                @Html.PasswordFor(model => model.Password, new { @class = "form-control", @placeholder = "Password", @required = "required", @id = "txtpass" })
                                </div>
                                <label class="control-label" id="lblvalidpass" for="inputError" style="display:none;">Your password should of length in between 6-20 and must contain at least 1 letter and 1 digit</label>
                            </div>
                            <div id="passchkContainer" class="textbox-wrap">
                                <div class="input-group">
                                    <span class="input-group-addon  glyphicon glyphicon-lock "></span>
                                    <input type="password" class="form-control " placeholder="Confirm-Password" required="required" id="txtcpass"/>                                    
                                </div>
                                <label class="control-label" id="lblerror" for="inputError" style="display:none;">Password Mismatch</label>
                                <label class="control-label" id="lblsuccess" for="inputError" style="display:none;">Password Matched</label>
                            </div>                                            
                            <div class="login-form-action clearfix">                          
                                <button type="submit" class="btn btn-success pull-right blue-btn">Register &nbsp; <span class="glyphicon glyphicon-chevron-right"></span></button>
                            </div>
                    }
            </div>            
        </div>
    </div>
</section>
</div>